using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SmartLink.DTOS.Permission
{
    /// <summary>
    /// 角色列表查询参数
    /// </summary>
    public class RolePagePara : PageBase
    {
        private int _enabledSelect;
        /// <summary>
        /// 状态筛选（-1，全部；0，禁用；1，启用）
        /// </summary>
        public int EnabledSelect
        {
            get { return _enabledSelect; }
            set
            {
                _enabledSelect = value;
                switch (value)
                {
                    case -1:
                        Enabled = null;
                        break;
                    case 0:
                        Enabled = false;
                        break;
                    case 1:
                        Enabled = true;
                        break;
                    default:
                        Enabled = null;
                        break;
                }
            }
        }
        /// <summary>
        /// 启用状态
        /// </summary>
        [JsonIgnore]
        public bool? Enabled { get; private set; }

        /// <summary>
        /// 关键字（名称、编号）
        /// </summary>		
        public string KeyWord { get; set; }
    }
}
